﻿<Window x:Class="Brjnk.GpxExplorer.Localization.LocalizationTool"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Language localization / Jazyková lokalizace" Height="350" Width="204" Loaded="Window_Loaded"
        DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}">
    <Grid>

        <ListView ItemsSource="{Binding Strings}" AlternationCount="2">
            <ListView.Resources>
                <Style TargetType="{x:Type ListViewItem }">
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                    <Style.Triggers>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                            <Setter Property="Background" Value="LightGray"></Setter>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ListView.Resources>
            <ListView.ItemTemplate>
                <DataTemplate>
                    <UniformGrid Rows="3" Margin="0 10">
                        <DockPanel>
                            <TextBlock DockPanel.Dock="Left"  Text="{Binding Key}" />
                            <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Click="Resume_Click" Content="&lt;&lt;"></Button>
                        </DockPanel>
                        <TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}" />
                    </UniformGrid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Window>